<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.14.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Vulkan Memory Allocator: Virtual allocator</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Vulkan Memory Allocator
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.14.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search',false);
  $(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">Virtual allocator </div></div>
</div><!--header-->
<div class="contents">

<p>API elements related to the mechanism of <a class="el" href="virtual_allocator.html">Virtual allocator</a> - using the core allocation algorithm for user-defined purpose without allocating any real GPU memory.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 id="header-nested-classes" class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:VmaVirtualBlockCreateInfo" id="r_VmaVirtualBlockCreateInfo"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_virtual_block_create_info.html">VmaVirtualBlockCreateInfo</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parameters of created <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a> object to be passed to <a class="el" href="#gab585754076877265fdae33e5c40ef13b" title="Creates new VmaVirtualBlock object.">vmaCreateVirtualBlock()</a>.  <a href="struct_vma_virtual_block_create_info.html#details">More...</a><br /></td></tr>
<tr class="memitem:VmaVirtualAllocationCreateInfo" id="r_VmaVirtualAllocationCreateInfo"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_virtual_allocation_create_info.html">VmaVirtualAllocationCreateInfo</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parameters of created virtual allocation to be passed to <a class="el" href="#ga6b7cdcc1c3e5103c323fedc4e1319e01" title="Allocates new virtual allocation inside given VmaVirtualBlock.">vmaVirtualAllocate()</a>.  <a href="struct_vma_virtual_allocation_create_info.html#details">More...</a><br /></td></tr>
<tr class="memitem:VmaVirtualAllocationInfo" id="r_VmaVirtualAllocationInfo"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_virtual_allocation_info.html">VmaVirtualAllocationInfo</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parameters of an existing virtual allocation, returned by <a class="el" href="#ga8ee14ceb1fe033ec84d8aa29e1f75afa" title="Returns information about a specific virtual allocation within a virtual block, like its size and pUs...">vmaGetVirtualAllocationInfo()</a>.  <a href="struct_vma_virtual_allocation_info.html#details">More...</a><br /></td></tr>
<tr class="memitem:VmaVirtualAllocation" id="r_VmaVirtualAllocation"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_virtual_allocation.html">VmaVirtualAllocation</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Represents single memory allocation done inside <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a>.  <a href="struct_vma_virtual_allocation.html#details">More...</a><br /></td></tr>
<tr class="memitem:VmaVirtualBlock" id="r_VmaVirtualBlock"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handle to a virtual block object that allows to use core allocation algorithm without allocating any real GPU memory.  <a href="struct_vma_virtual_block.html#details">More...</a><br /></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 id="header-typedef-members" class="groupheader"><a id="typedef-members" name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga0860ba1c0a67178fae4aecb63a78573e" id="r_ga0860ba1c0a67178fae4aecb63a78573e"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="#ga88bcf8c1cd3bb1610ff7343811c65bca">VmaVirtualBlockCreateFlagBits</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga0860ba1c0a67178fae4aecb63a78573e">VmaVirtualBlockCreateFlagBits</a></td></tr>
<tr class="memdesc:ga0860ba1c0a67178fae4aecb63a78573e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags to be passed as <a class="el" href="struct_vma_virtual_block_create_info.html#aaab9bf7e2d228c02ab6d90a72a6e6912" title="Use combination of VmaVirtualBlockCreateFlagBits.">VmaVirtualBlockCreateInfo::flags</a>.  <br /></td></tr>
<tr class="memitem:ga4e49c2f0ab7f6b4868833e5bac78d91e" id="r_ga4e49c2f0ab7f6b4868833e5bac78d91e"><td class="memItemLeft" align="right" valign="top">typedef VkFlags&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga4e49c2f0ab7f6b4868833e5bac78d91e">VmaVirtualBlockCreateFlags</a></td></tr>
<tr class="memdesc:ga4e49c2f0ab7f6b4868833e5bac78d91e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags to be passed as <a class="el" href="struct_vma_virtual_block_create_info.html#aaab9bf7e2d228c02ab6d90a72a6e6912" title="Use combination of VmaVirtualBlockCreateFlagBits.">VmaVirtualBlockCreateInfo::flags</a>. See <a class="el" href="#ga88bcf8c1cd3bb1610ff7343811c65bca" title="Flags to be passed as VmaVirtualBlockCreateInfo::flags.">VmaVirtualBlockCreateFlagBits</a>.  <br /></td></tr>
<tr class="memitem:ga936815e64946a6b6d812d08d10184c23" id="r_ga936815e64946a6b6d812d08d10184c23"><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="#ga2e9c64d405b14156fea7e10c4ad06cb6">VmaVirtualAllocationCreateFlagBits</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga936815e64946a6b6d812d08d10184c23">VmaVirtualAllocationCreateFlagBits</a></td></tr>
<tr class="memdesc:ga936815e64946a6b6d812d08d10184c23"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags to be passed as <a class="el" href="struct_vma_virtual_allocation_create_info.html#ab10e16956cc4bf20ced9de77d1129ea4" title="Use combination of VmaVirtualAllocationCreateFlagBits.">VmaVirtualAllocationCreateInfo::flags</a>.  <br /></td></tr>
<tr class="memitem:gae96ffc099bf898257fb19e9410ed08a7" id="r_gae96ffc099bf898257fb19e9410ed08a7"><td class="memItemLeft" align="right" valign="top">typedef VkFlags&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gae96ffc099bf898257fb19e9410ed08a7">VmaVirtualAllocationCreateFlags</a></td></tr>
<tr class="memdesc:gae96ffc099bf898257fb19e9410ed08a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags to be passed as <a class="el" href="struct_vma_virtual_allocation_create_info.html#ab10e16956cc4bf20ced9de77d1129ea4" title="Use combination of VmaVirtualAllocationCreateFlagBits.">VmaVirtualAllocationCreateInfo::flags</a>. See <a class="el" href="#ga2e9c64d405b14156fea7e10c4ad06cb6" title="Flags to be passed as VmaVirtualAllocationCreateInfo::flags.">VmaVirtualAllocationCreateFlagBits</a>.  <br /></td></tr>
<tr class="memitem:ga4753d42d40217a3a652a3cdf253ad773" id="r_ga4753d42d40217a3a652a3cdf253ad773"><td class="memItemLeft" align="right" valign="top">typedef struct VmaVirtualBlockCreateInfo&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga4753d42d40217a3a652a3cdf253ad773">VmaVirtualBlockCreateInfo</a></td></tr>
<tr class="memdesc:ga4753d42d40217a3a652a3cdf253ad773"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parameters of created <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a> object to be passed to <a class="el" href="#gab585754076877265fdae33e5c40ef13b" title="Creates new VmaVirtualBlock object.">vmaCreateVirtualBlock()</a>.  <br /></td></tr>
<tr class="memitem:gac3c90d80bedc6847a41b82d0e2158c9e" id="r_gac3c90d80bedc6847a41b82d0e2158c9e"><td class="memItemLeft" align="right" valign="top">typedef struct VmaVirtualAllocationCreateInfo&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gac3c90d80bedc6847a41b82d0e2158c9e">VmaVirtualAllocationCreateInfo</a></td></tr>
<tr class="memdesc:gac3c90d80bedc6847a41b82d0e2158c9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parameters of created virtual allocation to be passed to <a class="el" href="#ga6b7cdcc1c3e5103c323fedc4e1319e01" title="Allocates new virtual allocation inside given VmaVirtualBlock.">vmaVirtualAllocate()</a>.  <br /></td></tr>
<tr class="memitem:ga75bc33ff7cf18c98e101f570dc2a5ebc" id="r_ga75bc33ff7cf18c98e101f570dc2a5ebc"><td class="memItemLeft" align="right" valign="top">typedef struct VmaVirtualAllocationInfo&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga75bc33ff7cf18c98e101f570dc2a5ebc">VmaVirtualAllocationInfo</a></td></tr>
<tr class="memdesc:ga75bc33ff7cf18c98e101f570dc2a5ebc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parameters of an existing virtual allocation, returned by <a class="el" href="#ga8ee14ceb1fe033ec84d8aa29e1f75afa" title="Returns information about a specific virtual allocation within a virtual block, like its size and pUs...">vmaGetVirtualAllocationInfo()</a>.  <br /></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 id="header-enum-members" class="groupheader"><a id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga88bcf8c1cd3bb1610ff7343811c65bca" id="r_ga88bcf8c1cd3bb1610ff7343811c65bca"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga88bcf8c1cd3bb1610ff7343811c65bca">VmaVirtualBlockCreateFlagBits</a> { <a class="el" href="#gga88bcf8c1cd3bb1610ff7343811c65bcaae6423e2fa2f3c9211b21c819e3f10f96">VMA_VIRTUAL_BLOCK_CREATE_LINEAR_ALGORITHM_BIT</a> = 0x00000001
, <a class="el" href="#gga88bcf8c1cd3bb1610ff7343811c65bcaaf9487467136e1a9e371894dc3a7c4844">VMA_VIRTUAL_BLOCK_CREATE_ALGORITHM_MASK</a>
, <a class="el" href="#gga88bcf8c1cd3bb1610ff7343811c65bcaa5fc0d333c3d5687a8bbf57df9b377a87">VMA_VIRTUAL_BLOCK_CREATE_FLAG_BITS_MAX_ENUM</a> = 0x7FFFFFFF
 }</td></tr>
<tr class="memdesc:ga88bcf8c1cd3bb1610ff7343811c65bca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags to be passed as <a class="el" href="struct_vma_virtual_block_create_info.html#aaab9bf7e2d228c02ab6d90a72a6e6912" title="Use combination of VmaVirtualBlockCreateFlagBits.">VmaVirtualBlockCreateInfo::flags</a>.  <a href="#ga88bcf8c1cd3bb1610ff7343811c65bca">More...</a><br /></td></tr>
<tr class="memitem:ga2e9c64d405b14156fea7e10c4ad06cb6" id="r_ga2e9c64d405b14156fea7e10c4ad06cb6"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga2e9c64d405b14156fea7e10c4ad06cb6">VmaVirtualAllocationCreateFlagBits</a> { <br />
&#160;&#160;<a class="el" href="#gga2e9c64d405b14156fea7e10c4ad06cb6a9524a329a55b5ec390d57d90b67ad78e">VMA_VIRTUAL_ALLOCATION_CREATE_UPPER_ADDRESS_BIT</a> = VMA_ALLOCATION_CREATE_UPPER_ADDRESS_BIT
, <a class="el" href="#gga2e9c64d405b14156fea7e10c4ad06cb6ae2a9591a62b5e3b1bdcbc81c6188a1bf">VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT</a> = VMA_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT
, <a class="el" href="#gga2e9c64d405b14156fea7e10c4ad06cb6a562d10a46012719d33167d3dc5dbbf9b">VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT</a> = VMA_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT
, <a class="el" href="#gga2e9c64d405b14156fea7e10c4ad06cb6a3bb82d2aedd587a64846a1d7778852e6">VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_OFFSET_BIT</a> = VMA_ALLOCATION_CREATE_STRATEGY_MIN_OFFSET_BIT
, <br />
&#160;&#160;<a class="el" href="#gga2e9c64d405b14156fea7e10c4ad06cb6ac5b5e45c335368d18df59c9f27df17e3">VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MASK</a> = VMA_ALLOCATION_CREATE_STRATEGY_MASK
, <a class="el" href="#gga2e9c64d405b14156fea7e10c4ad06cb6ac1163c03ea837fa663462dc286d6a1a9">VMA_VIRTUAL_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM</a> = 0x7FFFFFFF
<br />
 }</td></tr>
<tr class="memdesc:ga2e9c64d405b14156fea7e10c4ad06cb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Flags to be passed as <a class="el" href="struct_vma_virtual_allocation_create_info.html#ab10e16956cc4bf20ced9de77d1129ea4" title="Use combination of VmaVirtualAllocationCreateFlagBits.">VmaVirtualAllocationCreateInfo::flags</a>.  <a href="#ga2e9c64d405b14156fea7e10c4ad06cb6">More...</a><br /></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 id="header-func-members" class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab585754076877265fdae33e5c40ef13b" id="r_gab585754076877265fdae33e5c40ef13b"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gab585754076877265fdae33e5c40ef13b">vmaCreateVirtualBlock</a> (const <a class="el" href="struct_vma_virtual_block_create_info.html">VmaVirtualBlockCreateInfo</a> *pCreateInfo, <a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a> *pVirtualBlock)</td></tr>
<tr class="memdesc:gab585754076877265fdae33e5c40ef13b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates new <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a> object.  <br /></td></tr>
<tr class="memitem:ga3795f7783ae2c182cede067d656f66a5" id="r_ga3795f7783ae2c182cede067d656f66a5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga3795f7783ae2c182cede067d656f66a5">vmaDestroyVirtualBlock</a> (<a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a> virtualBlock)</td></tr>
<tr class="memdesc:ga3795f7783ae2c182cede067d656f66a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a> object.  <br /></td></tr>
<tr class="memitem:gacd53b5b1d23f8fcbad692ccfdc1811f1" id="r_gacd53b5b1d23f8fcbad692ccfdc1811f1"><td class="memItemLeft" align="right" valign="top">VkBool32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#gacd53b5b1d23f8fcbad692ccfdc1811f1">vmaIsVirtualBlockEmpty</a> (<a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a> virtualBlock)</td></tr>
<tr class="memdesc:gacd53b5b1d23f8fcbad692ccfdc1811f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true of the <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a> is empty - contains 0 virtual allocations and has all its space available for new allocations.  <br /></td></tr>
<tr class="memitem:ga8ee14ceb1fe033ec84d8aa29e1f75afa" id="r_ga8ee14ceb1fe033ec84d8aa29e1f75afa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga8ee14ceb1fe033ec84d8aa29e1f75afa">vmaGetVirtualAllocationInfo</a> (<a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a> virtualBlock, <a class="el" href="struct_vma_virtual_allocation.html">VmaVirtualAllocation</a> allocation, <a class="el" href="struct_vma_virtual_allocation_info.html">VmaVirtualAllocationInfo</a> *pVirtualAllocInfo)</td></tr>
<tr class="memdesc:ga8ee14ceb1fe033ec84d8aa29e1f75afa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns information about a specific virtual allocation within a virtual block, like its size and <span class="tt">pUserData</span> pointer.  <br /></td></tr>
<tr class="memitem:ga6b7cdcc1c3e5103c323fedc4e1319e01" id="r_ga6b7cdcc1c3e5103c323fedc4e1319e01"><td class="memItemLeft" align="right" valign="top">VkResult&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga6b7cdcc1c3e5103c323fedc4e1319e01">vmaVirtualAllocate</a> (<a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a> virtualBlock, const <a class="el" href="struct_vma_virtual_allocation_create_info.html">VmaVirtualAllocationCreateInfo</a> *pCreateInfo, <a class="el" href="struct_vma_virtual_allocation.html">VmaVirtualAllocation</a> *pAllocation, VkDeviceSize *pOffset)</td></tr>
<tr class="memdesc:ga6b7cdcc1c3e5103c323fedc4e1319e01"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates new virtual allocation inside given <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a>.  <br /></td></tr>
<tr class="memitem:ga09fc688c0c3653ff23723b037e5d5033" id="r_ga09fc688c0c3653ff23723b037e5d5033"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga09fc688c0c3653ff23723b037e5d5033">vmaVirtualFree</a> (<a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a> virtualBlock, <a class="el" href="struct_vma_virtual_allocation.html">VmaVirtualAllocation</a> allocation)</td></tr>
<tr class="memdesc:ga09fc688c0c3653ff23723b037e5d5033"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees virtual allocation inside given <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a>.  <br /></td></tr>
<tr class="memitem:ga5eda6f55919fb05bd2f56a112590c571" id="r_ga5eda6f55919fb05bd2f56a112590c571"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga5eda6f55919fb05bd2f56a112590c571">vmaClearVirtualBlock</a> (<a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a> virtualBlock)</td></tr>
<tr class="memdesc:ga5eda6f55919fb05bd2f56a112590c571"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees all virtual allocations inside given <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a>.  <br /></td></tr>
<tr class="memitem:ga001ea1850458a4062b829e09c303fca2" id="r_ga001ea1850458a4062b829e09c303fca2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga001ea1850458a4062b829e09c303fca2">vmaSetVirtualAllocationUserData</a> (<a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a> virtualBlock, <a class="el" href="struct_vma_virtual_allocation.html">VmaVirtualAllocation</a> allocation, void *pUserData)</td></tr>
<tr class="memdesc:ga001ea1850458a4062b829e09c303fca2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes custom pointer associated with given virtual allocation.  <br /></td></tr>
<tr class="memitem:ga2902aa3130866afcc64bb5f984113db3" id="r_ga2902aa3130866afcc64bb5f984113db3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga2902aa3130866afcc64bb5f984113db3">vmaGetVirtualBlockStatistics</a> (<a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a> virtualBlock, <a class="el" href="struct_vma_statistics.html">VmaStatistics</a> *pStats)</td></tr>
<tr class="memdesc:ga2902aa3130866afcc64bb5f984113db3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates and returns statistics about virtual allocations and memory usage in given <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a>.  <br /></td></tr>
<tr class="memitem:ga93c5741bca44b43e5b849cacbd616098" id="r_ga93c5741bca44b43e5b849cacbd616098"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ga93c5741bca44b43e5b849cacbd616098">vmaCalculateVirtualBlockStatistics</a> (<a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a> virtualBlock, <a class="el" href="struct_vma_detailed_statistics.html">VmaDetailedStatistics</a> *pStats)</td></tr>
<tr class="memdesc:ga93c5741bca44b43e5b849cacbd616098"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates and returns detailed statistics about virtual allocations and memory usage in given <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a>.  <br /></td></tr>
</table>
<a name="details" id="details"></a><h2 id="header-details" class="groupheader">Detailed Description</h2>
<p>API elements related to the mechanism of <a class="el" href="virtual_allocator.html">Virtual allocator</a> - using the core allocation algorithm for user-defined purpose without allocating any real GPU memory. </p>
<a name="doc-typedef-members" id="doc-typedef-members"></a><h2 id="header-doc-typedef-members" class="groupheader">Typedef Documentation</h2>
<a id="ga936815e64946a6b6d812d08d10184c23" name="ga936815e64946a6b6d812d08d10184c23"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga936815e64946a6b6d812d08d10184c23">&#9670;&#160;</a></span>VmaVirtualAllocationCreateFlagBits</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="#ga2e9c64d405b14156fea7e10c4ad06cb6">VmaVirtualAllocationCreateFlagBits</a> <a class="el" href="#ga2e9c64d405b14156fea7e10c4ad06cb6">VmaVirtualAllocationCreateFlagBits</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Flags to be passed as <a class="el" href="struct_vma_virtual_allocation_create_info.html#ab10e16956cc4bf20ced9de77d1129ea4" title="Use combination of VmaVirtualAllocationCreateFlagBits.">VmaVirtualAllocationCreateInfo::flags</a>. </p>

</div>
</div>
<a id="gae96ffc099bf898257fb19e9410ed08a7" name="gae96ffc099bf898257fb19e9410ed08a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae96ffc099bf898257fb19e9410ed08a7">&#9670;&#160;</a></span>VmaVirtualAllocationCreateFlags</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VkFlags <a class="el" href="#gae96ffc099bf898257fb19e9410ed08a7">VmaVirtualAllocationCreateFlags</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Flags to be passed as <a class="el" href="struct_vma_virtual_allocation_create_info.html#ab10e16956cc4bf20ced9de77d1129ea4" title="Use combination of VmaVirtualAllocationCreateFlagBits.">VmaVirtualAllocationCreateInfo::flags</a>. See <a class="el" href="#ga2e9c64d405b14156fea7e10c4ad06cb6" title="Flags to be passed as VmaVirtualAllocationCreateInfo::flags.">VmaVirtualAllocationCreateFlagBits</a>. </p>

</div>
</div>
<a id="gac3c90d80bedc6847a41b82d0e2158c9e" name="gac3c90d80bedc6847a41b82d0e2158c9e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac3c90d80bedc6847a41b82d0e2158c9e">&#9670;&#160;</a></span>VmaVirtualAllocationCreateInfo</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct VmaVirtualAllocationCreateInfo VmaVirtualAllocationCreateInfo</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Parameters of created virtual allocation to be passed to <a class="el" href="#ga6b7cdcc1c3e5103c323fedc4e1319e01" title="Allocates new virtual allocation inside given VmaVirtualBlock.">vmaVirtualAllocate()</a>. </p>

</div>
</div>
<a id="ga75bc33ff7cf18c98e101f570dc2a5ebc" name="ga75bc33ff7cf18c98e101f570dc2a5ebc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga75bc33ff7cf18c98e101f570dc2a5ebc">&#9670;&#160;</a></span>VmaVirtualAllocationInfo</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct VmaVirtualAllocationInfo VmaVirtualAllocationInfo</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Parameters of an existing virtual allocation, returned by <a class="el" href="#ga8ee14ceb1fe033ec84d8aa29e1f75afa" title="Returns information about a specific virtual allocation within a virtual block, like its size and pUs...">vmaGetVirtualAllocationInfo()</a>. </p>

</div>
</div>
<a id="ga0860ba1c0a67178fae4aecb63a78573e" name="ga0860ba1c0a67178fae4aecb63a78573e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0860ba1c0a67178fae4aecb63a78573e">&#9670;&#160;</a></span>VmaVirtualBlockCreateFlagBits</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="#ga88bcf8c1cd3bb1610ff7343811c65bca">VmaVirtualBlockCreateFlagBits</a> <a class="el" href="#ga88bcf8c1cd3bb1610ff7343811c65bca">VmaVirtualBlockCreateFlagBits</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Flags to be passed as <a class="el" href="struct_vma_virtual_block_create_info.html#aaab9bf7e2d228c02ab6d90a72a6e6912" title="Use combination of VmaVirtualBlockCreateFlagBits.">VmaVirtualBlockCreateInfo::flags</a>. </p>

</div>
</div>
<a id="ga4e49c2f0ab7f6b4868833e5bac78d91e" name="ga4e49c2f0ab7f6b4868833e5bac78d91e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4e49c2f0ab7f6b4868833e5bac78d91e">&#9670;&#160;</a></span>VmaVirtualBlockCreateFlags</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef VkFlags <a class="el" href="#ga4e49c2f0ab7f6b4868833e5bac78d91e">VmaVirtualBlockCreateFlags</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Flags to be passed as <a class="el" href="struct_vma_virtual_block_create_info.html#aaab9bf7e2d228c02ab6d90a72a6e6912" title="Use combination of VmaVirtualBlockCreateFlagBits.">VmaVirtualBlockCreateInfo::flags</a>. See <a class="el" href="#ga88bcf8c1cd3bb1610ff7343811c65bca" title="Flags to be passed as VmaVirtualBlockCreateInfo::flags.">VmaVirtualBlockCreateFlagBits</a>. </p>

</div>
</div>
<a id="ga4753d42d40217a3a652a3cdf253ad773" name="ga4753d42d40217a3a652a3cdf253ad773"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4753d42d40217a3a652a3cdf253ad773">&#9670;&#160;</a></span>VmaVirtualBlockCreateInfo</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct VmaVirtualBlockCreateInfo VmaVirtualBlockCreateInfo</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Parameters of created <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a> object to be passed to <a class="el" href="#gab585754076877265fdae33e5c40ef13b" title="Creates new VmaVirtualBlock object.">vmaCreateVirtualBlock()</a>. </p>

</div>
</div>
<a name="doc-enum-members" id="doc-enum-members"></a><h2 id="header-doc-enum-members" class="groupheader">Enumeration Type Documentation</h2>
<a id="ga2e9c64d405b14156fea7e10c4ad06cb6" name="ga2e9c64d405b14156fea7e10c4ad06cb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2e9c64d405b14156fea7e10c4ad06cb6">&#9670;&#160;</a></span>VmaVirtualAllocationCreateFlagBits</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="#ga2e9c64d405b14156fea7e10c4ad06cb6">VmaVirtualAllocationCreateFlagBits</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Flags to be passed as <a class="el" href="struct_vma_virtual_allocation_create_info.html#ab10e16956cc4bf20ced9de77d1129ea4" title="Use combination of VmaVirtualAllocationCreateFlagBits.">VmaVirtualAllocationCreateInfo::flags</a>. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga2e9c64d405b14156fea7e10c4ad06cb6a9524a329a55b5ec390d57d90b67ad78e" name="gga2e9c64d405b14156fea7e10c4ad06cb6a9524a329a55b5ec390d57d90b67ad78e"></a>VMA_VIRTUAL_ALLOCATION_CREATE_UPPER_ADDRESS_BIT&#160;</td><td class="fielddoc"><p>Allocation will be created from upper stack in a double stack pool. </p>
<p>This flag is only allowed for virtual blocks created with <a class="el" href="#gga88bcf8c1cd3bb1610ff7343811c65bcaae6423e2fa2f3c9211b21c819e3f10f96" title="Enables alternative, linear allocation algorithm in this virtual block.">VMA_VIRTUAL_BLOCK_CREATE_LINEAR_ALGORITHM_BIT</a> flag. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2e9c64d405b14156fea7e10c4ad06cb6ae2a9591a62b5e3b1bdcbc81c6188a1bf" name="gga2e9c64d405b14156fea7e10c4ad06cb6ae2a9591a62b5e3b1bdcbc81c6188a1bf"></a>VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BIT&#160;</td><td class="fielddoc"><p>Allocation strategy that tries to minimize memory usage. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2e9c64d405b14156fea7e10c4ad06cb6a562d10a46012719d33167d3dc5dbbf9b" name="gga2e9c64d405b14156fea7e10c4ad06cb6a562d10a46012719d33167d3dc5dbbf9b"></a>VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BIT&#160;</td><td class="fielddoc"><p>Allocation strategy that tries to minimize allocation time. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2e9c64d405b14156fea7e10c4ad06cb6a3bb82d2aedd587a64846a1d7778852e6" name="gga2e9c64d405b14156fea7e10c4ad06cb6a3bb82d2aedd587a64846a1d7778852e6"></a>VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_OFFSET_BIT&#160;</td><td class="fielddoc"><p>Allocation strategy that chooses always the lowest offset in available space. This is not the most efficient strategy but achieves highly packed data. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2e9c64d405b14156fea7e10c4ad06cb6ac5b5e45c335368d18df59c9f27df17e3" name="gga2e9c64d405b14156fea7e10c4ad06cb6ac5b5e45c335368d18df59c9f27df17e3"></a>VMA_VIRTUAL_ALLOCATION_CREATE_STRATEGY_MASK&#160;</td><td class="fielddoc"><p>A bit mask to extract only <span class="tt">STRATEGY</span> bits from entire set of flags. </p>
<p>These strategy flags are binary compatible with equivalent flags in <a class="el" href="group__group__alloc.html#gad9889c10c798b040d59c92f257cae597" title="Flags to be passed as VmaAllocationCreateInfo::flags.">VmaAllocationCreateFlagBits</a>. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga2e9c64d405b14156fea7e10c4ad06cb6ac1163c03ea837fa663462dc286d6a1a9" name="gga2e9c64d405b14156fea7e10c4ad06cb6ac1163c03ea837fa663462dc286d6a1a9"></a>VMA_VIRTUAL_ALLOCATION_CREATE_FLAG_BITS_MAX_ENUM&#160;</td><td class="fielddoc"></td></tr>
</table>

</div>
</div>
<a id="ga88bcf8c1cd3bb1610ff7343811c65bca" name="ga88bcf8c1cd3bb1610ff7343811c65bca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga88bcf8c1cd3bb1610ff7343811c65bca">&#9670;&#160;</a></span>VmaVirtualBlockCreateFlagBits</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="#ga88bcf8c1cd3bb1610ff7343811c65bca">VmaVirtualBlockCreateFlagBits</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Flags to be passed as <a class="el" href="struct_vma_virtual_block_create_info.html#aaab9bf7e2d228c02ab6d90a72a6e6912" title="Use combination of VmaVirtualBlockCreateFlagBits.">VmaVirtualBlockCreateInfo::flags</a>. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga88bcf8c1cd3bb1610ff7343811c65bcaae6423e2fa2f3c9211b21c819e3f10f96" name="gga88bcf8c1cd3bb1610ff7343811c65bcaae6423e2fa2f3c9211b21c819e3f10f96"></a>VMA_VIRTUAL_BLOCK_CREATE_LINEAR_ALGORITHM_BIT&#160;</td><td class="fielddoc"><p>Enables alternative, linear allocation algorithm in this virtual block. </p>
<p>Specify this flag to enable linear allocation algorithm, which always creates new allocations after last one and doesn't reuse space from allocations freed in between. It trades memory consumption for simplified algorithm and data structure, which has better performance and uses less memory for metadata.</p>
<p>By using this flag, you can achieve behavior of free-at-once, stack, ring buffer, and double stack. For details, see documentation chapter <a class="el" href="custom_memory_pools.html#linear_algorithm">Linear allocation algorithm</a>. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga88bcf8c1cd3bb1610ff7343811c65bcaaf9487467136e1a9e371894dc3a7c4844" name="gga88bcf8c1cd3bb1610ff7343811c65bcaaf9487467136e1a9e371894dc3a7c4844"></a>VMA_VIRTUAL_BLOCK_CREATE_ALGORITHM_MASK&#160;</td><td class="fielddoc"><p>Bit mask to extract only <span class="tt">ALGORITHM</span> bits from entire set of flags. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga88bcf8c1cd3bb1610ff7343811c65bcaa5fc0d333c3d5687a8bbf57df9b377a87" name="gga88bcf8c1cd3bb1610ff7343811c65bcaa5fc0d333c3d5687a8bbf57df9b377a87"></a>VMA_VIRTUAL_BLOCK_CREATE_FLAG_BITS_MAX_ENUM&#160;</td><td class="fielddoc"></td></tr>
</table>

</div>
</div>
<a name="doc-func-members" id="doc-func-members"></a><h2 id="header-doc-func-members" class="groupheader">Function Documentation</h2>
<a id="ga93c5741bca44b43e5b849cacbd616098" name="ga93c5741bca44b43e5b849cacbd616098"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga93c5741bca44b43e5b849cacbd616098">&#9670;&#160;</a></span>vmaCalculateVirtualBlockStatistics()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vmaCalculateVirtualBlockStatistics </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a></td>          <td class="paramname"><span class="paramname"><em>virtualBlock</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_vma_detailed_statistics.html">VmaDetailedStatistics</a> *</td>          <td class="paramname"><span class="paramname"><em>pStats</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculates and returns detailed statistics about virtual allocations and memory usage in given <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a>. </p>
<p>This function is slow to call. Use for debugging purposes. For less detailed statistics, see <a class="el" href="#ga2902aa3130866afcc64bb5f984113db3" title="Calculates and returns statistics about virtual allocations and memory usage in given VmaVirtualBlock...">vmaGetVirtualBlockStatistics()</a>. </p>

</div>
</div>
<a id="ga5eda6f55919fb05bd2f56a112590c571" name="ga5eda6f55919fb05bd2f56a112590c571"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5eda6f55919fb05bd2f56a112590c571">&#9670;&#160;</a></span>vmaClearVirtualBlock()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vmaClearVirtualBlock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a></td>          <td class="paramname"><span class="paramname"><em>virtualBlock</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Frees all virtual allocations inside given <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a>. </p>
<p>You must either call this function or free each virtual allocation individually with <a class="el" href="#ga09fc688c0c3653ff23723b037e5d5033" title="Frees virtual allocation inside given VmaVirtualBlock.">vmaVirtualFree()</a> before destroying a virtual block. Otherwise, an assert is called.</p>
<p>If you keep pointer to some additional metadata associated with your virtual allocation in its <span class="tt">pUserData</span>, don't forget to free it as well. </p>

</div>
</div>
<a id="gab585754076877265fdae33e5c40ef13b" name="gab585754076877265fdae33e5c40ef13b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab585754076877265fdae33e5c40ef13b">&#9670;&#160;</a></span>vmaCreateVirtualBlock()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VkResult vmaCreateVirtualBlock </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_vma_virtual_block_create_info.html">VmaVirtualBlockCreateInfo</a> *</td>          <td class="paramname"><span class="paramname"><em>pCreateInfo</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a> *</td>          <td class="paramname"><span class="paramname"><em>pVirtualBlock</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates new <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a> object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">pCreateInfo</td><td>Parameters for creation. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">pVirtualBlock</td><td>Returned virtual block object or <span class="tt">VMA_NULL</span> if creation failed. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga3795f7783ae2c182cede067d656f66a5" name="ga3795f7783ae2c182cede067d656f66a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3795f7783ae2c182cede067d656f66a5">&#9670;&#160;</a></span>vmaDestroyVirtualBlock()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vmaDestroyVirtualBlock </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a></td>          <td class="paramname"><span class="paramname"><em>virtualBlock</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destroys <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a> object. </p>
<p>Please note that you should consciously handle virtual allocations that could remain unfreed in the block. You should either free them individually using <a class="el" href="#ga09fc688c0c3653ff23723b037e5d5033" title="Frees virtual allocation inside given VmaVirtualBlock.">vmaVirtualFree()</a> or call <a class="el" href="#ga5eda6f55919fb05bd2f56a112590c571" title="Frees all virtual allocations inside given VmaVirtualBlock.">vmaClearVirtualBlock()</a> if you are sure this is what you want. If you do neither, an assert is called.</p>
<p>If you keep pointers to some additional metadata associated with your virtual allocations in their <span class="tt">pUserData</span>, don't forget to free them. </p>

</div>
</div>
<a id="ga8ee14ceb1fe033ec84d8aa29e1f75afa" name="ga8ee14ceb1fe033ec84d8aa29e1f75afa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8ee14ceb1fe033ec84d8aa29e1f75afa">&#9670;&#160;</a></span>vmaGetVirtualAllocationInfo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vmaGetVirtualAllocationInfo </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a></td>          <td class="paramname"><span class="paramname"><em>virtualBlock</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_vma_virtual_allocation.html">VmaVirtualAllocation</a></td>          <td class="paramname"><span class="paramname"><em>allocation</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_vma_virtual_allocation_info.html">VmaVirtualAllocationInfo</a> *</td>          <td class="paramname"><span class="paramname"><em>pVirtualAllocInfo</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns information about a specific virtual allocation within a virtual block, like its size and <span class="tt">pUserData</span> pointer. </p>

</div>
</div>
<a id="ga2902aa3130866afcc64bb5f984113db3" name="ga2902aa3130866afcc64bb5f984113db3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2902aa3130866afcc64bb5f984113db3">&#9670;&#160;</a></span>vmaGetVirtualBlockStatistics()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vmaGetVirtualBlockStatistics </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a></td>          <td class="paramname"><span class="paramname"><em>virtualBlock</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_vma_statistics.html">VmaStatistics</a> *</td>          <td class="paramname"><span class="paramname"><em>pStats</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculates and returns statistics about virtual allocations and memory usage in given <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a>. </p>
<p>This function is fast to call. For more detailed statistics, see <a class="el" href="#ga93c5741bca44b43e5b849cacbd616098" title="Calculates and returns detailed statistics about virtual allocations and memory usage in given VmaVir...">vmaCalculateVirtualBlockStatistics()</a>. </p>

</div>
</div>
<a id="gacd53b5b1d23f8fcbad692ccfdc1811f1" name="gacd53b5b1d23f8fcbad692ccfdc1811f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacd53b5b1d23f8fcbad692ccfdc1811f1">&#9670;&#160;</a></span>vmaIsVirtualBlockEmpty()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VkBool32 vmaIsVirtualBlockEmpty </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a></td>          <td class="paramname"><span class="paramname"><em>virtualBlock</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns true of the <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a> is empty - contains 0 virtual allocations and has all its space available for new allocations. </p>

</div>
</div>
<a id="ga001ea1850458a4062b829e09c303fca2" name="ga001ea1850458a4062b829e09c303fca2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga001ea1850458a4062b829e09c303fca2">&#9670;&#160;</a></span>vmaSetVirtualAllocationUserData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vmaSetVirtualAllocationUserData </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a></td>          <td class="paramname"><span class="paramname"><em>virtualBlock</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_vma_virtual_allocation.html">VmaVirtualAllocation</a></td>          <td class="paramname"><span class="paramname"><em>allocation</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *</td>          <td class="paramname"><span class="paramname"><em>pUserData</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Changes custom pointer associated with given virtual allocation. </p>

</div>
</div>
<a id="ga6b7cdcc1c3e5103c323fedc4e1319e01" name="ga6b7cdcc1c3e5103c323fedc4e1319e01"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6b7cdcc1c3e5103c323fedc4e1319e01">&#9670;&#160;</a></span>vmaVirtualAllocate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">VkResult vmaVirtualAllocate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a></td>          <td class="paramname"><span class="paramname"><em>virtualBlock</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="struct_vma_virtual_allocation_create_info.html">VmaVirtualAllocationCreateInfo</a> *</td>          <td class="paramname"><span class="paramname"><em>pCreateInfo</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_vma_virtual_allocation.html">VmaVirtualAllocation</a> *</td>          <td class="paramname"><span class="paramname"><em>pAllocation</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">VkDeviceSize *</td>          <td class="paramname"><span class="paramname"><em>pOffset</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Allocates new virtual allocation inside given <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a>. </p>
<p>If the allocation fails due to not enough free space available, <span class="tt">VK_ERROR_OUT_OF_DEVICE_MEMORY</span> is returned (despite the function doesn't ever allocate actual GPU memory). <span class="tt">pAllocation</span> is then set to <span class="tt">VK_NULL_HANDLE</span> and <span class="tt">pOffset</span>, if not null, it set to <span class="tt">UINT64_MAX</span>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir"></td><td class="paramname">virtualBlock</td><td>Virtual block </td></tr>
    <tr><td class="paramdir"></td><td class="paramname">pCreateInfo</td><td>Parameters for the allocation </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">pAllocation</td><td>Returned handle of the new allocation </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">pOffset</td><td>Returned offset of the new allocation. Optional, can be null. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga09fc688c0c3653ff23723b037e5d5033" name="ga09fc688c0c3653ff23723b037e5d5033"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga09fc688c0c3653ff23723b037e5d5033">&#9670;&#160;</a></span>vmaVirtualFree()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void vmaVirtualFree </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_vma_virtual_block.html">VmaVirtualBlock</a></td>          <td class="paramname"><span class="paramname"><em>virtualBlock</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_vma_virtual_allocation.html">VmaVirtualAllocation</a></td>          <td class="paramname"><span class="paramname"><em>allocation</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Frees virtual allocation inside given <a class="el" href="struct_vma_virtual_block.html" title="Handle to a virtual block object that allows to use core allocation algorithm without allocating any ...">VmaVirtualBlock</a>. </p>
<p>It is correct to call this function with <span class="tt">allocation == VK_NULL_HANDLE</span> - it does nothing. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
